<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	</head>

	<body>


		<div style="border-style: solid; border-width: 1px;border-color: #CCC">
			<h3 style="background-color: #f0ffff">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;筛选</h3>
			<br>
			<form action="__ADMIN__/member/index" method="post">
			<div class="layui-form-item">
					<label class="layui-form-label">工号:</label>
					<div class="layui-input-block">
						<input name="id" lay-verify="title" id='id' autocomplete="off" placeholder="" value="{$id}" class="layui-input" type="text">
				  	<div id="logo_img"></div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">昵称:</label>
					<div class="layui-input-block">
						<input name="nickname" lay-verify="title" id='nickname' autocomplete="off" placeholder="" value="{$nickname}" class="layui-input" type="text">
				  	<div id="logo_img"></div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">电话:</label>
					<div class="layui-input-block">
						<input name="phone" lay-verify="title" id='phone' autocomplete="off" placeholder="" value="{$phone}" class="layui-input" type="text">
				  	<div id="logo_img"></div>
					</div>
				</div>
				<div class="layui-form-item">
				    <label class="layui-form-label">等级</label>
				    <div class="layui-input-block">
				      <select name="level" id="level" lay-verify="required">
						   {if condition="($level == 1)"}
					    <option value="0" >全部</option >
				        <option value="1" selected>专员</option>
				        <option value="2" >经理</option>
				        <option value="3" >银行家</option>						   
							{elseif condition="($vo.level == 2)"}
					    <option value="0" >全部</option >
				        <option value="1" >专员</option>
				        <option value="2" selected>经理</option>
				        <option value="3" >银行家</option>							
							{elseif condition="($vo.level == 3)"}
					    <option value="0" >全部</option >
				        <option value="1" >专员</option>
				        <option value="2" >经理</option>
				        <option value="3" selected>银行家</option>							
							{else/}
					    <option value="0"selected >全部</option >
				        <option value="1" >专员</option>
				        <option value="2" >经理</option>
				        <option value="3" >银行家</option>
							{/if}
				      </select>
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">业务员</label>
				    <div class="layui-input-block">
				      <select name="yewuy" lay-verify="required" id='yewuy'>
				      	   {if condition="(empty($yewuy) )"}
			      	   	 <option value="" selected>全部</option >
				        <option value="1" >是</option>
				        <option value="0" >否</option>
				      	   	{elseif condition="($yewuy == 1)"}
		      	   		 <option value="" >全部</option >
				        <option value="1" selected >是</option>
				        <option value="0" >否</option>
				      	   	{else/}
	      	   			 <option value="" >全部</option >
				        <option value="1" >是</option>
				        <option value="0" selected>否</option>
				      	   	{/if}
  					
				       
				      </select>
				    </div>
				  </div>
				  <div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
			</form>
		</div>
		<br>
			<fieldset class="layui-elem-field">
				<legend>数据列表</legend>
				<div class="layui-field-box">
					<table class="site-table table-hover">
						<thead>
							<tr>
								<th>工号</th>
								<th>昵称</th>
								<th>头像</th>
								<th>余额</th>
								<th>等级</th>
								<th>姓名</th>
								<th>微信号</th>
								<th>手机号</th>
								<th>身份证</th>
								<th>注册时间</th>
								<th>业务员</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody id ="tbody">					
					   {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.uid}</td>
                                <td>{$vo.nickname}</td>
                                <td><img width="30px" src="{$vo.avatar}"></td>
                                <td>{$vo.credit2}</td>
                           
                      
                                <td>{$vo.level}</td>
                        	
                                  <td>{$vo.name}</td>
                                  <td>{$vo.weixin}</td>
                                  <td>{$vo.mobile}</td>
                                  <td>{$vo.idcard}</td>
                                  <td>{$vo.createtime}</td>
                               
                                    <td>{$vo.yewuy}</td>
                                
                            
								<td>
									<a href="__ADMIN__/member/add?id={$vo.id}" class="layui-btn layui-btn-mini">编辑</a>
								</td>
							</tr>
							{/volist}
						</tbody>
					</table>
							<div id="page"></div>
	
				</div>
			</fieldset>
	</body>

			<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>

	</html>
		<script>
			layui.config({
				base: '__STATIC__/plugins/layui/modules/'
			});
			layui.use(['laypage', 'layer'], function(){
				  var laypage = layui.laypage;
				  var id = $("#id").val();
				  var nickname = $("#nickname").val();
				  var phone = $("#phone").val();
				  var level = $("#level").val();
				  var yewuy = $("#yewuy").val();
				    laypage.render({
					    elem: 'page'
					    ,count: {$count} //数据总数
					    ,limit:20
					    ,jump: function(obj){
					     	$.ajax({
					     		type:"post",
					     		url:"__ADMIN__/member/index",
					     		data:{
					     			page:obj.curr,
					     			id:id,
					     			nickname:nickname,
					     			phone:phone,
					     			level:level,
					     			yewuy:yewuy
					     		},
					     		dataType:"json",
					     		success:function(res){
					     			var table =  "";
					     			for(var a = 0 ;a<res.length;a++){
					     				// alert(res.length);
					     				 table+= '<tr>';
					     				 table+= '<td>'+res[a].uid+'</td>';
					     				 table+= '<td>'+res[a].nickname+'</td>';
					     				 table+= '<td><img width="30px" src="'+res[a].avatar+'"></td>';
					     				 table+= '<td>'+res[a].credit2+'</td>';
					     				 table+= '<td>'+res[a].level+'</td>';
					     				 table+= '<td>'+res[a].name+'</td>';
					     				 table+= '<td>'+res[a].weixin+'</td>';
					     				 table+= '<td>'+res[a].phone+'</td>';
					     				 table+= '<td>'+res[a].idcard+'</td>';
					     				 table+= '<td>'+res[a].createtime+'</td>';
					     				 table+= '<td>'+res[a].yewuy+'</td>';
					     				 table+= '<td><a href="__ADMIN__/member/add?id='+res[a].uid+'" class="layui-btn layui-btn-mini">编辑</a></td>';
					     				 table+= '</tr>';

			
					     			}
					     			 $("#tbody").html(table);

					     		}
					     	})
					    }
					  });




			})
		</script>